<template>
  <div class="box">
    <swiper class="swiper" :options="swiperOption">
      <swiper-slide v-for="(item, index) in slides" :key="index" class="slide">
        <div class="slide-div">
          <img class="swiper-img" :src="item.src" />
          <p class="text-full">
            <span>{{ item.text }}</span>
            <span>{{ item.type }}</span>
          </p>
        </div>
      </swiper-slide>
    </swiper>
  </div>
</template>

<script>
export default {
  data() {
    return {
      swiperOption: {
        slidesPerView: 5,
        spaceBetween: 50,
        // init: false,
        pagination: {
          el: ".swiper-pagination",
          clickable: true
        },
        breakpoints: {
          1024: {
            slidesPerView: 4,
            spaceBetween: 10
          },
          768: {
            slidesPerView: 4,
            spaceBetween: 10
          },
          640: {
            slidesPerView: 4,
            spaceBetween: 10
          },
          320: {
            slidesPerView: 4,
            spaceBetween: 10
          }
        }
      },
      slides: [
        {
          title: "资深导师",
          name: "YOYO",
          info: "丰富的教学经验，日韩首席交流导师",
          src: require("./../assets/banji4.png"),
          text: "韩式半永久",
          type: "全能班"
        },
        {
          title: "资深导师",
          name: "YOYO",
          info: "丰富的教学经验，日韩首席交流导师",
          src: require("./../assets/banji1.png"),
          text: "韩式半永久",
          type: "大师班"
        },
        {
          title: "资深导师",
          name: "YOYO",
          info: "丰富的教学经验，日韩首席交流导师",
          src: require("./../assets/banji2.png"),
          text: "韩式半永久",
          type: "研修班"
        },
        {
          title: "资深导师",
          name: "YOYO",
          info: "丰富的教学经验，日韩首席交流导师",
          src: require("./../assets/banji3.png"),
          text: "皮肤管理",
          type: "国内班"
        },
        {
          title: "资深导师",
          name: "YOYO",
          info: "丰富的教学经验，日韩首席交流导师",
          src: require("./../assets/banji4.png"),
          text: "韩式半永久",
          type: "全能班"
        },
        {
          title: "资深导师",
          name: "YOYO",
          info: "丰富的教学经验，日韩首席交流导师",
          src: require("./../assets/banji1.png"),
          text: "韩式半永久",
          type: "大师班"
        },
        {
          title: "资深导师",
          name: "YOYO",
          info: "丰富的教学经验，日韩首席交流导师",
          src: require("./../assets/banji2.png"),
          text: "韩式半永久",
          type: "研修班"
        },
        {
          title: "资深导师",
          name: "YOYO",
          info: "丰富的教学经验，日韩首席交流导师",
          src: require("./../assets/banji3.png"),
          text: "皮肤管理",
          type: "国内班"
        }
        // {
        //   title: "资深导师",
        //   name: "YOYO",
        //   info: "丰富的教学经验，日韩首席交流导师",
        //   src: require("./../../public/shizililiang1.png"),
        //   text: "韩式半永久",
        //   type: "全能班"
        // },
        // {
        //   title: "资深导师",
        //   name: "YOYO",
        //   info: "丰富的教学经验，日韩首席交流导师",
        //   src: require("./../../public/shizililiang1.png"),
        //   text: "韩式半永久",
        //   type: "全能班"
        // },
        // {
        //   title: "资深导师",
        //   name: "YOYO",
        //   info: "丰富的教学经验，日韩首席交流导师",
        //   src: require("./../../public/shizililiang1.png"),
        //   text: "韩式半永久",
        //   type: "全能班"
        // },
        // {
        //   title: "资深导师",
        //   name: "YOYO",
        //   info: "丰富的教学经验，日韩首席交流导师",
        //   src: require("./../../public/shizililiang1.png"),
        //   text: "韩式半永久",
        //   type: "全能班"
        // }
      ],
      publicPath: process.env.BASE_URL
    };
  }
};
</script>

<style lang="scss" scoped>
.box {
  width: 100%;
  box-sizing: border-box;
  padding: 0 20px;
  margin: 0 auto;
}
.swiper {
  height: 220px;
  .slide {
    .slide-div {
      height: 100%;
      color: #fff;
      font-size: 12px;
      position: relative;
      span {
        display: block;
      }
    }
    p {
      margin: 0;
    }
    img {
      width: 100%;
      height: 70%;
      margin: 0 !important;
      display: block;
    }
  }
  .slide:nth-child(odd) {
    img {
      position: absolute;
      bottom: 0;
    }
    .text-full {
      padding-top: 25px;
      // margin-top: 15px !important;
    }
  }
  .slide:nth-child(even) {
    .text-full {
      padding-top: 15px;
    }
  }
  .text {
    background: #48433a;
    border-radius: 0 0 5px 5px;
    color: #fff;
    box-sizing: border-box;
    padding: 3px;
    span {
      display: block;
      margin-top: 5px;
    }
    .title {
      font-size: 14px;
    }
    .name {
      font-size: 14px;
    }
    .info {
      font-size: 9px;
    }
  }
}
.big-title {
  margin-top: 30px;
  .big-title-text {
    font-size: 22px;
    color: #000;
    text-align: center;
  }
  .big-title-text-info {
    width: 50%;
    color: #000;
    font-size: 14px;
    text-align: center;
    margin: 0 auto;
  }
  .img1 {
    margin-top: 10px;
    width: 100%;
  }
  .img2-box {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    img {
      width: 48%;
      height: 130px;
      margin-top: 5px;
    }
  }
  .img3-box {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    img {
      width: 32%;
      height: 110px;
      margin-top: 5px;
    }
  }
}
</style>
